"""
用户 响应体 模型
"""

from pydantic import (
    BaseModel,
    Field,
)


from schema.base_schema.restful import OKWithData


class AuthenticationData(BaseModel):
    """ 认证信息 """

    token: str = Field(..., title="Token")
    user_code: str = Field(..., title="用户编号", min_length=20, max_length=20)
    nickname: str = Field(..., title="用户昵称", min_length=3, max_length=20)


class AuthenticationResponse(OKWithData):
    """ 认证信息 响应体 """

    data: AuthenticationData
